home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 July to December / Ahoy_Magazine_84-Jul-Dec_1984_Double_L_unofficial.d64 / multi-draw 64 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  13KB  |  317 lines

  1. 2 rem *************************************************************************
  2. 3 rem make sure you raised basic by           typing poke44,64:poke64*256,0:new
  3. 4 rem before entering or loading this !!***************************************
  4. 5 onagoto981,982,983
  5. 6 ifpeek(44)<>64thenprint"[147]basic has not been moved. restart!!!":list2-4
  6. 7 poke3846,226:poke53281,6:poke53280,14:poke178,0:poke179,16:print"[154]"
  7. 10 print"[147]             multi-draw 64"
  8. 15 print"             by: pete lobl"
  9. 16 print"            version 9/19/83"
  10. 20 print"please wait, reading in machine code..."
  11. 30 dimc$(15),ch%(11):p$="":fori=1to22:p$=p$+"":next:fori=0to15:readc$(i):next
  12. 40 fori=1to10:readx%(i),y%(i):next
  13. 50 c1=6:c2=2:c3=1:cc=1:k$="joy":k=0:p=1:pe$="dow":tb=14:mb=15:x=64:y=88:ce=6
  14. 60 pe=1:mv=1:fs$="fas":fs=1:pl=864:cl=3072:rv=3200:fl=3328:rj=3584:in=3712
  15. 65 poke2040,35:poke2041,39:poke2042,43:poke2043,47:poke53277,15:poke53271,4
  16. 67 fori=53287to53291:pokei,1:next:poke53264,7:cx=828:cy=829
  17. 68 fori=53248to53252step2:pokei,32:next
  18. 69 poke53251,128:poke53249,104:poke53253,170
  19. 70 gosub1000:rem read in ml
  20. 80 fori=1to63:reada:poke2240+i,a:next:poke2240,99
  21. 82 fori=0to63:reada:poke2496+i,a:next
  22. 84 fori=0to63:reada:poke2752+i,a:next
  23. 86 fori=0to63:reada:poke3008+i,a:next
  24. 88 fori=0to35:reada:poke4608+i,a:next
  25. 90 yc=53255:xc=53254:x1=6:y1=43
  26. 92 pokexc,x*2+x1:pokeyc,y+y1:sysin:poke53274,241:poke56334,0:syscl
  27. 93 poke689,tb:poke704,mb:poke53269,15:printp$"":gosub990:gosub840:poke53280,c1
  28. 94 poke848,cc:poke849,c1:poke850,c2:poke851,c3:poke53269,7
  29. 96 fori=0to175:pokecy,i:pokecx,0:syspl:pokecx,124:syspl:next
  30. 98 fori=0to124:pokecx,i:pokecy,0:syspl:pokecx,i:pokecy,175:syspl:next
  31. 99 poke53269,15:poke198,0:h=124:hy=175
  32. 100 ifkthen120
  33. 105 poke650,.:sysrj:a=peek(679):ifa=.then120
  34. 107 q=x%(a)*mv+x:r=y%(a)*mv+y:ifq>hthenq=q-h-1:goto109
  35. 108 ifq<.thenq=h+q+1
  36. 109 ifr>hythenr=r-hy-1:goto111
  37. 110 ifr<.thenr=hy+r+1
  38. 111 x=q:y=r:pokecx,x:pokecy,y:ifpethensyspl
  39. 112 iffs=0thengosub850
  40. 113 pokexc,x*2+x1:pokeyc,y+y1:goto100
  41. 120 geta$:ifa$=""then100
  42. 121 ifk=0then138
  43. 122 poke650,128:ifa$<>"i"then124
  44. 123 a=2:goto107
  45. 124 ifa$<>"u"then126
  46. 125 a=8:goto107
  47. 126 ifa$<>"j"then128
  48. 127 a=6:goto107
  49. 128 ifa$<>"n"then130
  50. 129 a=10:goto107
  51. 130 ifa$<>"m"then132
  52. 131 a=4:goto107
  53. 132 ifa$<>","then134
  54. 133 a=7:goto107
  55. 134 ifa$<>"k"then136
  56. 135 a=3:goto107
  57. 136 ifa$<>"o"then138
  58. 137 a=5:goto107
  59. 138 poke198,0:ifa$<>"-"then141
  60. 139 ifkthenk=0:k$="joy":gosub990:gosub840:goto100
  61. 140 k=1:k$="key":gosub990:gosub840:goto100
  62. 141 ifa$<>"e"then143
  63. 142 cc=0:poke848,0:gosub990:gosub840:goto100
  64. 143 ifa$="r"thensysrv:goto100
  65. 145 ifa$="[136]"thena=peek(704):a=(a+1)*-(a<15):poke704,a:goto100
  66. 146 ifa$="[140]"thena=peek(704):a=a-1:a=a+((sgn(a)=-1)*(-16)):poke704,a:goto100
  67. 147 ifa$="^"thena=peek(689):a=(a+1)*-(a<15):poke689,a:goto100
  68. 148 ifa$="*"thena=peek(689):a=a-1:a=a+((sgn(a)=-1)*(-16)):poke689,a:goto100
  69. 149 ifa$="/"thena=peek(53290):a=(a+1)*-(a<255):poke53290,a:goto100
  70. 150 ifa$="?"thena=peek(53290):a=a-1:a=a+((sgn(a)=-1)*(-256)):poke53290,a:goto100
  71. 153 ifa$<>"\"then156
  72. 154 iffsthenfs=0:fs$="slo":goto180
  73. 155 fs=1:fs$="fas":goto180
  74. 156 ifa$<>"+"then159
  75. 157 ifpeek(53269)=15thenpoke53269,7:goto100
  76. 158 poke53269,15:goto100
  77. 159 ifa$<>"p"then162
  78. 160 ifpethenpe=0:pe$="up ":gosub990:gosub840:goto100
  79. 161 pe=1:pe$="dow":gosub990:gosub840:goto100
  80. 162 ifa$<>""then164
  81. 163 syscl:gosub990:gosub840:goto90
  82. 164 ifa$<>"l"then166
  83. 165 gosub950:gosub990:gosub840:goto100
  84. 166 ifa$<>"s"then168
  85. 167 gosub900:gosub990:printp$"[145][145]":gosub840:goto100
  86. 168 ifa$<>"m"then170
  87. 169 gosub182:poke53269,0:gosub860:gosub870:poke3846,226:poke53269,15:goto184
  88. 170 ifa$<>"x"then200
  89. 171 poke53269,0:gosub860:print"[147]i hope you had fun, see ya' next time"
  90. 172 print"oh, why don't you experiment with"
  91. 173 print"location 3846. poke different numbers"
  92. 174 print"there.  you may not know it, but you'll"
  93. 175 print"be controlling the raster interrupt!!!"
  94. 176 print"till next time, have fun..............":end
  95. 180 gosub990:gosub840:goto100
  96. 182 printp$"             please wait               [146]"p$
  97. 183 a=5376:b=1024:c=2023:fori=btoc:pokea,peek(i):a=a+1:next:return
  98. 184 a=5376:b=1024:c=2023:fori=btoc:pokei,peek(a):a=a+1:next:gosub840:goto100
  99. 199 rem commands continued ************
  100. 200 ifa$<>"q"then204
  101. 201 gosub990:printp$:input"new increment ";a$:a=int(val(a$)):ifa<1thena=1
  102. 202 ifa>9thena=9
  103. 203 mv=a:gosub990:gosub840:goto100
  104. 204 ifa$<>":"then209
  105. 205 a=ce:a=(a+1)*-(a<15):poke848+cc,a:gosub990:ce=a:poke53280,ce
  106. 206 ifcc=2thenc2=a:gosub840:goto100
  107. 207 ifcc=3thenc3=a:gosub840:goto100
  108. 208 c1=a:gosub840:goto100
  109. 209 ifa$<>"d"then214
  110. 210 a=ce:a=a-1:a=a+((sgn(a)=-1)*(-16)):gosub990:ce=a:poke53280,ce
  111. 211 poke848+cc,a:ifcc=2thenc2=a:gosub840:goto100
  112. 212 ifcc=3thenc3=a:gosub840:goto100
  113. 213 c1=a:gosub840:goto100
  114. 214 ifa$<>"[133]"then216
  115. 215 poke848,1:ce=c1:cc=1:poke53280,ce:gosub990:gosub840:goto100
  116. 216 ifa$<>"[134]"then218
  117. 217 poke848,2:ce=c2:cc=2:poke53280,ce:gosub990:gosub840:goto100
  118. 218 ifa$<>"[135]"then220
  119. 219 poke848,3:ce=c3:cc=3:poke53280,ce:gosub990:gosub840:goto100
  120. 220 ifa$<>"f"then100
  121. 221 gosub990:printp$:input"color # ";a$:a=int(val(a$)):ifa<1ora>3thena=1
  122. 222 poke674,a:gosub990:printp$:input"color value ";a$:a=int(val(a$))
  123. 223 ifa<0ora>15thena=0
  124. 224 poke675,a:sysfl:gosub990:gosub840:goto100
  125. 840 rem print bottom 3 lines **********
  126. 841 gosub990:printp$"num[146]"str$(cc)" col[146] "c$(ce)" "k$"[146] inc[146]"str$(mv);
  127. 842 print" pen[146] "pe$" spe[146] "fs$
  128. 843 print"col1[146] "c$(c1)" col2[146] "c$(c2)" col3[146] "c$(c3)" x[146]"x;
  129. 844 print"y[146]"y
  130. 845 return
  131. 850 rem print new x and y *************
  132. 851 printp$""tab(27)"x[146]          [157][157][157][157][157][157][157][157][157][157]"x"y[146]"y:return
  133. 860 rem move raster up ****************
  134. 865 poke3846,0:return
  135. 867 loc.3846 = location to start putting    the normal text at (y coordinate)
  136. 870 rem list commands *****************
  137. 872 print"[147]  u  i  o"
  138. 874 print"    [205][221][206]"
  139. 876 print"  j[192][192][219][192][192]k   keys to move cursor"
  140. 878 print"    [206][221][205]     ( or use joystick )"
  141. 880 print"  n  m  ,"
  142. 881 print"p = toggles between pen up and pen down"
  143. 882 print"f1,f3,f5 = change to colors 1,2,3"
  144. 883 print": = increment current color"
  145. 884 print"d = decrement current color"
  146. 885 print"- = toggles joystick/key movement"
  147. 886 print"s = save screen"
  148. 887 print"l = load screen"
  149. 888 print"f7,f8 = inc/dec hi-res background color"
  150. 889 print"e = change to erase mode (color 0)"
  151. 890 print"[home] = clears hi-res screen"
  152. 891 print"+ = toggles cursor on/off"
  153. 892 print"f = fills screen with a color"
  154. 893 print"r = reverses screen"
  155. 894 print"q = change cursor increment"
  156. 895 print"\ = toggles fast/slow cursor movement"
  157. 896 print"/,[shift]/ = inc/dec cursor color"
  158. 897 print"^,* = inc/dec text background"
  159. 898 print"x = exits program"
  160. 899 print"hit space bar to return[146]":wait197,32,0:return
  161. 900 rem save sub **********************
  162. 902 na$="":gosub990
  163. 905 printp$;:input"name of screen    [157][157][157]";na$
  164. 910 printp$;:input"tape or disk (t/d)         [157][157][157][157][157][157][157][157]";dv$
  165. 915 ifna$=""anddv$="d"thenreturn
  166. 920 iflen(na$)>15thenreturn
  167. 921 gosub990
  168. 922 printp$"             please wait               [146]"p$
  169. 925 poke3846,0:ifdv$="t"thend=1:goto927
  170. 926 d=8
  171. 927 poke4611,d:poke4618,len(na$)+1:a=1:na$=na$+"1"
  172. 928 printp$;:fori=1tolen(na$):poke4863+i,asc(mid$(na$,i,1)):next
  173. 929 ifa=1thenpoke4627,4:poke4631,0:poke4639,7:poke4637,127
  174. 931 ifa=2thenpoke4627,32:poke4631,0:poke4639,62:poke4637,0
  175. 933 ifa=3thenpoke4627,216:poke4631,0:poke4639,219:poke4637,127
  176. 935 sys4608:na$=left$(na$,len(na$)-1)
  177. 937 a=a+1:ifa=2thenna$=na$+"2":goto928
  178. 939 ifa=3thenna$=na$+"3":goto928
  179. 941 gosub990:print"":poke3846,226:poke56334,0:return
  180. 950 rem load sub **********************
  181. 952 na$="":gosub990
  182. 955 printp$;:input"name of screen    [157][157][157]";na$
  183. 960 printp$;:input"tape or disk (t/d)         [157][157][157][157][157][157][157][157]";dv$
  184. 965 ifna$=""anddv$="d"thenreturn
  185. 970 iflen(na$)>15thenreturn
  186. 972 gosub990
  187. 975 printp$"            please wait                [146]"p$;
  188. 976 poke3846,0:ifleft$(dv$,1)="t"thend=1:goto980
  189. 977 d=8
  190. 980 printp$"[145]";:na$=na$+"1":a=1:loadna$,d,1
  191. 981 printp$"[145]";:a=a+1:na$=left$(na$,len(na$)-1):na$=na$+"2":loadna$,d,1
  192. 982 printp$"[145]";:a=a+1:na$=left$(na$,len(na$)-1):na$=na$+"3":loadna$,d,1
  193. 983 poke3846,226:poke56334,0:gosub990:gosub840:goto100
  194. 990 rem clear text ********************
  195. 992 fori=1904to2023:pokei,32:next:return
  196. 1000 fori=1to11:readch%(i):next
  197. 1010 b=1:t=0
  198. 1020 reada$:te=val(a$):ifa$="e"then1040
  199. 1025 ifa$="f"then1050
  200. 1030 t=t+te:goto1020
  201. 1040 ift=ch%(b)thenb=b+1:t=0:goto1020
  202. 1045 print"error in data block"b:end
  203. 1050 ift=ch%(b)then1060
  204. 1055 print"error in data block"b:end
  205. 1060 print"data correct, now entering..."
  206. 1065 restore:fori=1to47:reada$:next
  207. 1070 a=864:b=953:gosub1200:a=2048:b=2200:gosub1200:a=2304:b=2468:gosub1200
  208. 1080 a=2560:b=2728:gosub1200:a=2816:b=2932:gosub1200:a=3072:b=3174:gosub1200
  209. 1090 a=3200:b=3237:gosub1200:a=3328:b=3465:gosub1200:a=3584:b=3635:gosub1200
  210. 1100 a=3712:b=3746:gosub1200:a=3840:b=3920:gosub1200
  211. 1150 print"data entered!!!":return
  212. 1200 fori=atob:readt:pokei,t:next:reada$:return
  213. 2999 rem color translate data *********
  214. 3000 datablk,wht,red,cyn,pur,grn,blu,yel,org,brn,lrd,dgr,mgr,lgn,lbl,lgr
  215. 3009 rem joystick array data **********
  216. 3010 data,,,-1,1,,,1,1,-1,-1,,1,1,-1,-1,,,-1,1
  217. 5900 rem checksums ********************
  218. 5910 data10078,18217,19331,19145,13292,10587,4275,12661,4922,3396,9730
  219. 6000 rem block 1 **********************
  220. 6005 data14,60,3,173,66,3,201,1,240,19,162,0,189,170,3,157,66,3
  221. 6010 data189,178,3,157,84,3,232,224,8,208,239,160,0,132,249,169,32
  222. 6020 data133,250,173,80,3,240,20,201,3,240,19,132,253,162,4,134,254
  223. 6030 data201,1,240,3,76,0,9,76,0,10,76,0,11,132,251,169,216
  224. 6040 data133,252,76,0,8,1,2,4,8,16,32,64,128,254,253,251,247
  225. 6050 data239,223,191,127,e
  226. 6060 rem block 2 **********************
  227. 6065 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  228. 6070 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  229. 6080 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  230. 6090 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  231. 6100 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  232. 6110 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,66
  233. 6120 data3,17,249,145,249,202,189,66,3,17,249,145,249,174,63,3,24
  234. 6130 data240,14,165,251,105,40,133,251,144,3,230,252,24,202,208,242,165
  235. 6140 data251,109,62,3,133,251,144,2,230,252,173,83,3,145,251,96,e
  236. 6150 rem block 3 **********************
  237. 6155 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  238. 6160 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  239. 6170 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  240. 6180 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  241. 6190 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  242. 6200 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,66
  243. 6210 data3,17,249,145,249,202,189,84,3,49,249,145,249,174,63,3,24
  244. 6220 data240,14,165,253,105,40,133,253,144,3,230,254,24,202,208,242,165
  245. 6230 data253,109,62,3,133,253,144,2,230,254,173,82,3,41,15,141,62
  246. 6240 data3,177,253,41,240,13,62,3,145,253,96,e
  247. 6250 rem block 4 **********************
  248. 6255 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  249. 6260 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  250. 6270 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  251. 6280 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  252. 6290 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  253. 6300 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,84
  254. 6310 data3,49,249,145,249,202,189,66,3,17,249,145,249,174,63,3,24
  255. 6320 data240,14,165,253,105,40,133,253,144,3,230,254,24,202,208,242,165
  256. 6330 data253,109,62,3,133,253,144,2,230,254,173,81,3,41,15,10,10
  257. 6340 data10,10,141,62,3,177,253,41,15,13,62,3,145,253,96,e
  258. 6350 rem block 5 **********************
  259. 6355 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  260. 6360 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  261. 6370 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  262. 6380 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  263. 6390 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  264. 6400 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,84
  265. 6410 data3,49,249,145,249,202,189,84,3,49,249,145,249,96,e
  266. 6420 rem block 6 **********************
  267. 6425 data160,0,162,32,142,67,12,232,142,70,12,232,142,73,12,232,142,76
  268. 6430 data12,173,33,208,10,10,10,10,141,176,2,173,33,208,41,15,13
  269. 6440 data176,2,153,0,216,153,0,217,153,0,218,153,232,218,153,0,4
  270. 6450 data153,0,5,153,0,6,153,232,6,200,208,229,152,153,0,60,153
  271. 6460 data0,61,153,0,62,153,0,63,200,208,241,174,67,12,224,60,240
  272. 6470 data15,238,67,12,238,70,12,238,73,12,238,76,12,76,65,12,96,e
  273. 6480 rem block 7 **********************
  274. 6485 data160,0,162,32,142,140,12,142,145,12,185,0,32,73,255,153,0,32,200
  275. 6490 data208,245,173,140,12,201,63,240,9,238,140,12,238,145,12,76,138,12,96,e
  276. 6540 rem block 8 **********************
  277. 6545 data160,0,173,163,2,174,162,2,224,1,240,20,224,2,240,71,153
  278. 6550 data0,216,153,0,217,153,0,218,153,0,219,200,208,241,96,10,10
  279. 6560 data10,10,141,164,2,185,0,4,41,15,13,164,2,153,0,4,185,0
  280. 6570 data5,41,15,13,164,2,153,0,5,185,0,6,41,15,13,164,2
  281. 6580 data153,0,6,185,232,6,41,15,13,164,2,153,232,6,200,208
  282. 6590 data209,96,141,164,2,185,0,4,41,240,13,164,2,153,0,4,185
  283. 6600 data0,5,41,240,13,164,2,153,0,5,185,0,6,41,240,13,164
  284. 6610 data2,153,0,6,185,232,6,41,240,13,164,2,153,232,6,200,208,209,96,e
  285. 6620 rem block 9 **********************
  286. 6625 data169,0,141,167,2,173,0,220,106,176,9,162,2,142,167,2,106
  287. 6630 data76,28,14,106,176,5,162,4,142,167,2,106,176,9,173,167,2
  288. 6640 data105,6,141,167,2,96,106,176,8,173,167,2,105,3,141,167,2,96,e
  289. 6650 rem block 10 *********************
  290. 6655 data120,169,15,141,21,3,169,0,141,20,3,141,178,2,141,18,208
  291. 6660 data173,17,208,41,127,141,17,208,173,25,208,9,1,141,25,208,88,96,e
  292. 6670 rem block 11 *********************
  293. 6675 data173,178,2,208,37,169,226,141,18,208,169,59,141,17,208,173,192
  294. 6680 data2,141,33,208,169,29,141,24,208,169,24,141,22,208,169,1,141
  295. 6690 data25,208,141,178,2,76,49,234,169,252,141,18,208,169,27,141,17
  296. 6700 data208,173,177,2,141,33,208,169,21,141,24,208,169,8,141,22,208
  297. 6710 data169,1,141,25,208,169,0,141,178,2,76,129,234,f
  298. 6999 rem sprite data ******************
  299. 7000 data74,250,85,74,34,73,74,34,65,74,34,65,74,34,65,123,162
  300. 7010 data0,0,0,49,198,68,41,41,68,37,41,68,37,207,84,41,41
  301. 7020 data84,49,41,40,0,0,0,1,196,0,2,4,128,2,4,128,3
  302. 7030 data199,128,2,32,128,1,192,128,0,0,0,0,4,0,0,4,18
  303. 7040 data0,7,146,64,4,158,0,7,130,64,0,14,0,0,0,0,61
  304. 7050 data239,188,37,2,32,61,194,56,33,2,32,33,226,60,0,8,0
  305. 7060 data33,232,64,33,47,64,33,41,64,61,239,120,0,0,0,0,0
  306. 7070 data0,0,0,0,0,0,0,0,37,124,136,37,16,216,61,16,168
  307. 7080 data37,16,136,37,16,136,0,0,0,15,123,192,8,74,64,14,75
  308. 7090 data128,8,74,64,8,122,64,0,0,0,0,0,0,139,232,162,218
  309. 7100 data12,162,171,138,162,138,9,162,138,8,162,139,232,190,0,0,0
  310. 7110 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0
  311. 7120 data64,0,1,240,0,1,16,0,7,28,0,1,16,0,1,240,0
  312. 7130 data0,64,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0
  313. 7140 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  314. 7200 rem save ml data *****************
  315. 7210 data169,1,162,8,160,255,32,186,255,169,15,162,0,160,19,32,189,255,169
  316. 7220 data4,133,253,169,0,133,252,169,252,162,127,160,7,32,216,255,96
  317.